home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form FAB
- BackColor = &H00C0C0C0&
- BorderStyle = 3 'Fixed Double
- Caption = "About APPNAME"
- ClientHeight = 4470
- ClientLeft = 1665
- ClientTop = 1335
- ClientWidth = 6240
- FillColor = &H00FFFFFF&
- Height = 4875
- Icon = ABOUTBOX.FRX:0000
- Left = 1605
- LinkTopic = "Form2"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 4470
- ScaleWidth = 6240
- Top = 990
- Width = 6360
- Begin PictureBox IconPicture
- AutoSize = -1 'True
- BorderStyle = 0 'None
- Height = 480
- Left = 240
- ScaleHeight = 480
- ScaleWidth = 480
- TabIndex = 1
- Top = 240
- Width = 480
- End
- Begin CommandButton CommandOK
- Cancel = -1 'True
- Caption = "OK"
- Default = -1 'True
- Height = 495
- Left = 5040
- TabIndex = 0
- Top = 120
- Width = 1095
- End
- Begin Label Label1
- Alignment = 2 'Center
- BackColor = &H00C0C0C0&
- Caption = "AOL: StevenG400"
- Height = 255
- Left = 960
- TabIndex = 20
- Top = 4110
- Width = 4455
- End
- Begin Label MyInfoLabel
- Alignment = 2 'Center
- Caption = "CompuServe: Steven Gotz 70563,207"
- Height = 255
- Left = 960
- TabIndex = 19
- Top = 3840
- Width = 4455
- End
- Begin Label OptLabel
- BorderStyle = 1 'Fixed Single
- Height = 30
- Index = 5
- Left = 960
- TabIndex = 18
- Top = 2040
- Width = 4335
- End
- Begin Label OptLabel
- BorderStyle = 1 'Fixed Single
- Height = 30
- Index = 2
- Left = 960
- TabIndex = 17
- Top = 1320
- Width = 4335
- End
- Begin Label OptLabel
- Caption = "FSRs"
- Height = 255
- Index = 14
- Left = 3120
- TabIndex = 16
- Top = 3360
- Width = 2295
- End
- Begin Label OptLabel
- Caption = "System Resources:"
- Height = 255
- Index = 13
- Left = 960
- TabIndex = 15
- Top = 3360
- Width = 2055
- End
- Begin Label OptLabel
- Caption = "Dos Version"
- Height = 255
- Index = 7
- Left = 960
- TabIndex = 14
- Top = 2400
- Width = 2295
- End
- Begin Label OptLabel
- Caption = "Win Version"
- Height = 255
- Index = 6
- Left = 960
- TabIndex = 13
- Top = 2160
- Width = 2175
- End
- Begin Label OptLabel
- Caption = "Math Coproc"
- Height = 255
- Index = 12
- Left = 3120
- TabIndex = 12
- Top = 3120
- Width = 2175
- End
- Begin Label OptLabel
- Caption = "Math Co-processor:"
- Height = 255
- Index = 11
- Left = 960
- TabIndex = 11
- Top = 3120
- Width = 2055
- End
- Begin Label OptLabel
- Caption = "Memory"
- Height = 255
- Index = 10
- Left = 3120
- TabIndex = 10
- Top = 2880
- Width = 2175
- End
- Begin Label OptLabel
- Caption = "Memory:"
- Height = 255
- Index = 9
- Left = 960
- TabIndex = 9
- Top = 2880
- Width = 2055
- End
- Begin Label OptLabel
- Caption = "Win Mode"
- Height = 255
- Index = 8
- Left = 960
- TabIndex = 8
- Top = 2640
- Width = 4335
- End
- Begin Label NameLabel
- Caption = "Name Label"
- Height = 255
- Left = 960
- TabIndex = 2
- Top = 120
- Width = 4275
- End
- Begin Label OptLabel
- Caption = "Company Name"
- Height = 255
- Index = 4
- Left = 960
- TabIndex = 7
- Top = 1680
- Width = 4275
- End
- Begin Label OptLabel
- Caption = "User Name"
- Height = 255
- Index = 3
- Left = 960
- TabIndex = 6
- Top = 1440
- Width = 4275
- End
- Begin Label OptLabel
- Caption = "Extra 2"
- Height = 255
- Index = 1
- Left = 960
- TabIndex = 5
- Top = 1020
- Width = 4275
- End
- Begin Label OptLabel
- Caption = "Extra 1"
- Height = 255
- Index = 0
- Left = 960
- TabIndex = 4
- Top = 720
- Width = 4275
- End
- Begin Label CoprLabel
- Caption = "Copyright Label"
- Height = 255
- Left = 960
- TabIndex = 3
- Top = 420
- Width = 4275
- End
- Begin Shape Shape1
- BackColor = &H80000008&
- BorderStyle = 0 'Transparent
- FillColor = &H00FFFFFF&
- FillStyle = 0 'Solid
- Height = 735
- Left = 105
- Top = 120
- Width = 735
- End
- Option Explicit
- ' To use the generic About Box defined in this file, your MAK file must
- ' also include the module ABOUTBOX.BAS. Just call the function
- ' DisplayAboutBox, passing parameters specific to your program. DO NOT
- ' load the form FAB prior to calling DisplayAboutBox!
- Sub CommandOK_Click ()
- Unload FAB
- End Sub
- Function FixAmpersand$ (ByVal Buffer$)
- Dim N%
- N = 1
- Do Until N = 0
- N = InStr(N, Buffer, "&")
- If N > 0 Then
- Buffer = Left$(Buffer, N) + Mid$(Buffer, N)
- N = N + 2
- End If
- Loop
- FixAmpersand = Buffer
- End Function
- Sub Form_Load ()
- Dim Version&, WinVer
- ' The 4 bytes of the Long returned by GetVersion encode the Windows
- ' and DOS version number in this order, from low byte to high byte:
- ' Windows major version number, Windows minor version number,
- ' DOS minor version number, DOS major version number.
- Version = GetVersion()
- WinVer = ((Version And &HFF) * 100) + ((Version \ &H100) And &HFF)
- ' The functions used to get the user name, company name, and FSR
- ' percentage aren't available in Windows versions before 3.1. If
- ' this is an earlier version, add those items to the exclude list.
- If WinVer < 310 Then
- Excl = Excl Or AB_NO_USER Or AB_NO_COMPANY Or AB_NO_FSR
- End If
- ' If both user and company are excluded, eliminate the separator
- If Excl And (AB_NO_USER Or AB_NO_COMPANY) Then
- EliminateLabel 2
- Else
- ' Get access to USER's strings by getting a handle to USER
- Dim hInstUser%
- hInstUser = LoadLibrary("USER")
- FreeLibrary hInstUser
- End If
- Dim Buffer$, Success%, N%
- ' Get the User name, if wanted
- If Excl And AB_NO_USER Then
- EliminateLabel 3
- Else
- Buffer = String$(31, 0)
- If LoadString(hInstUser, 514, Buffer, 30) Then
- OptLabel(3).Caption = FixAmpersand(Buffer)
- End If
- End If
- ' Get the Company name, if wanted
- If Excl And AB_NO_COMPANY Then
- EliminateLabel 4
- Else
- Buffer = String$(31, 0)
- If LoadString(hInstUser, 515, Buffer, 30) Then
- OptLabel(4).Caption = FixAmpersand(Buffer)
- End If
- End If
- Dim V$
- ' Show Windows version, if wanted
- If Excl And AB_NO_WINVER Then
- EliminateLabel 6
- Else
- V = "Windows " + Format$(Version And &HFF)
- V = V + "." + Format$((Version \ &H100) And &HFF, "00")
- OptLabel(6).Caption = V
- End If
- ' Show DOS version, if wanted
- If Excl And AB_NO_DOSVER Then
- EliminateLabel 7
- Else
- V = "DOS " + Format$((Version \ &H1000000) And &HFF)
- V = V + "." + Format$((Version \ &H10000) And &HFF, "00")
- OptLabel(7).Caption = V
- End If
- Dim WinFlags&
- WinFlags = GetWinFlags()
- ' Show Windows mode, if wanted
- If Excl And AB_NO_WINMODE Then
- EliminateLabel 8
- Else
- If WinFlags And WF_ENHANCED Then
- OptLabel(8) = "386 Enhanced Mode"
- ElseIf WinFlags And WF_PMODE Then
- OptLabel(8) = "Standard Mode"
- Else
- OptLabel(8) = "Real Mode"
- End If
- End If
- ' Show Memory, if wanted
- If Excl And AB_NO_MEMORY Then
- EliminateLabel 9
- OptLabel(10).Visible = False
- Else
- Dim FreeSpace&
- FreeSpace = GetFreeSpace(0)
- OptLabel(10).Caption = Format$(FreeSpace \ 1024, "#,###,##0") + " KB Free"
- End If
- ' Show 80x87 presence, if wanted
- If Excl And AB_NO_80x87 Then
- EliminateLabel 11
- OptLabel(12).Visible = False
- Else
- If WinFlags And WF_80x87 Then
- OptLabel(12) = "Present"
- Else
- OptLabel(12) = "Absent"
- End If
- End If
- ' Show FSRs, if wanted
- If Excl And AB_NO_FSR Then
- EliminateLabel 13
- OptLabel(14).Visible = False
- Else
- OptLabel(14) = Format$(GetFreeSystemResources(GFSR_SYSTEMRESOURCES)) + "% Free"
- End If
- End Sub
-